import request from '@/utils/request'

const api_name = '/eduService/edu_chapter'


export default {

    //查询课程结构
    getNestedTreeList(courseId) {
        return request({
            url: `${api_name}/chapter/${courseId}`,
            method: 'get'
        })
    },
    //保存章节
    save(course) {
        return request({
            url: `${api_name}/save`,
            method: 'post',
            data:course
        })
    }
    ,
    //根据id查询
    geByid(courseId) {
        return request({
            url: `${api_name}/getById/${courseId}`,
            method: 'get'
        })
    },
    //根据id删除
    del(courseId){
        return request({
            url: `${api_name}/${courseId}`,
            method: 'delete'
        })
    }

}